Tutorial 3: Adding a new diatomic species entry to your local data store

If you would like to do calculations using a plasma species that you haven’t used before, you will need to generate a minplascalc data entry for it first. You only need to do this once - minplascalc will store the species data in a plain-text file formatted using JSON syntax, and it will then be available for use in any of your future calculations.

The procedure for generating a minplascalc data entry for a new diatomic species is entirely manual since the data required must be retrieved from various locations. The majority of data for a wide range of species is available from the NIST Chemistry WebBook, http://webbook.nist.gov/chemistry/form-ser/. Enter the formula for the diatomic species you’re interested in in the search box at the top of the page, and click the Search button. If you’re looking for data for charged diatomic ions, make sure the “Exclude ions from the search” box is unchecked. Let’s build a data entry for Silicon Monoxide, SiO:

The first pieces of information needed are the ionisation energy (to turn SiO into SiO+) and the bond dissociation energy (to turn SiO into monatomic Si and O), both in units of cm-1. The ionisation energy can be found on the “Gas phase ion energetics” link on the Chemistry WebBook species page (usually in units of eV, so remember to convert):

The dissociation energy can be found either on the NIST Computational Chemistry Comparison and Benchmark Database (http://cccbdb.nist.gov/introx.asp), or alternatively from chemistry textbooks or other sources. In the case of SiO, the value is 66707.6 cm-1 (approximately 800 kJ/mol).

We then need some information about the electronic ground state of the molecule, and its vibrational and rotational parameters. To get this, go back to the main page for SiO in the Chemistry WebBook and click on “Constants of diatomic molecules”. This gives the parameters of various energetic states of the molecule - we want the ground state with energy \(T_e\) = 0, so scroll all the way down to the entry at the very bottom:

The electronic degeneracy of the ground state, \(g_0\), is given by the superscripted number in the expression in the “State” column - in the case of SiO, it’s 1. The vibrational constant \(\omega_e\) and rotational constant \(B_e\) are read off the appropriate columns for the ground state entry. The symmetry constant \(\sigma_s\) takes the value of 1 for heteronuclear molecules like SiO, and 2 for homonuclear molecules like O2. Now we have all the information to build a minplascalc data entry for the SiO species, which can be done by running the following code snippet:

In [2]:
import minplascalc as mpc
import json

species_data = mpc.build_diatomic_species_json(
    name="SiO",
    stoichiometry={"Si": 1, "O": 1},
    molarmass=0.0440849,
    chargenumber=0,
    ionisationenergy=92673.11,
    dissociationenergy=66707.6,
    sigma_s=1,
    g0=1,
    w_e=1241.55,
    b_e=0.7267512)

with open('SiO.json', 'w') as jf:
    json.dump(species_data, jf, indent=4)

What’s happening here? As before we import the minplascalc package, then we call a function to build the species data for us.

The function takes as arguments the species name (which is also used as the data entry’s associated file name), a small dictionary describing the elemental stoichiometry of the species (in this case one oxygen and one silicon), the molar mass in kg/mol, the charge on the species in units of the fundamental charge (in this case 0 because SiO is a neutral species), the ionisation and dissociation energies of the species in cm-1, and the electronic, vibrational, and rotational energy level parameters looked up from the Chemistry WebBook. Internally to minplascalc the function assembles the species information into a Python dictionary format, which we then write out to a JSON file called “SiO.json” on the path you’re running this notebook from.

After this process it will be possible to create an SiO species object in any minplascalc calculation by importing it using either the explicit path to the JSON file, or (preferably) just the name of the species provided the JSON file is stored in any of the standard minplascalc data paths - see later demos for examples.

In [ ]: